import { Layout } from '@fl/utils/routerHelper'

const orderManagement = {
    children: [
        {
            component: () => import('@/supplier-pages/order-management/protocol-management/index.vue'),
            meta: {
                title: '协议管理',
            },
            name: 'protocol-management',
            path: 'protocol-management',
        },
        {
            component: () => import('@/supplier-pages/order-management/protocol-management/add.vue'),
            meta: {
                activeMenu: '/supplier-pages/order-management/protocol-management',
                hidden: true,
                noTagsView: true,
                title: '新增协议',
            },
            name: 'add-protocol',
            path: 'add-protocol',
        },
        {
            component: () => import('@/supplier-pages/order-management/protocol-management/detail.vue'),
            meta: {
                activeMenu: '/supplier-pages/order-management/protocol-management',
                hidden: true,
                noTagsView: true,
                title: '协议详情',
            },
            name: 'protocol-detail',
            path: 'protocol-detail/:id',
        },
        {
            component: () => import('@/pages/product-preview/index.vue'),
            meta: {
                activeMenu: '/supplier-pages/order-management/protocol-management',
                hidden: true,
                // noTagsView: true,
                title: '产品预览',
            },
            name: 'supplier-product-preview',
            path: 'supplier-product-preview',
        },
        {
            component: () => import('@/supplier-pages/order-management/sales-order/index.vue'),
            meta: {
                title: '销售订单',
            },
            name: 'sales-order-index',
            path: 'sales-order',
        },
        {
            component: () => import('@/supplier-pages/order-management/sales-order/component/log.vue'),
            meta: {
                activeMenu: '/supplier-pages/order-management/sales-order',
                hidden: true,
                noTagsView: true,
                title: '操作日志',
            },
            name: 'sales-order-log',
            path: 'sales-order-log',
        },
        {
            component: () => import('@/supplier-pages/order-management/sales-order/component/view.vue'),
            meta: {
                activeMenu: '/supplier-pages/order-management/sales-order',
                hidden: true,
                noTagsView: true,
                title: '查看并接单',
            },
            name: 'sales-order-view',
            path: 'sales-order/:id',
        },
        {
            component: () => import('@/supplier-pages/order-management/contract-management/index.vue'),
            meta: {
                title: '合同管理',
            },
            name: 'contract-management',
            path: 'contract-management',
        },
        {
            component: () => import('@/supplier-pages/order-management/contract-management/detail.vue'),
            meta: {
                activeMenu: '/supplier-pages/order-management/contract-management',
                hidden: true,
                noTagsView: true,
                title: '合同详情',
            },
            name: 'contract-detail',
            path: 'contract-detail',
        },
        {
            component: () => import('@/supplier-pages/order-management/receivables-account/index.vue'),
            meta: {
                title: '收款账号',
            },
            name: 'receivables-account',
            path: 'receivables-account',
        },
    ],
    component: Layout,
    meta: {
        alwaysShow: true,
        // icon: 'i-clarity:certificate-line',
        title: '订单管理',
    },
    name: 'order-management',
    path: 'order-management',
    redirect: '/supplier-pages/order-management/protocol-management',
}

export default orderManagement
